﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile" Inherits="Nivdal.TranslateInterfaceTranslated" Title="Translated interface sentences - nivdal.com!" Codebehind="TranslateInterfaceTranslated.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HiddenField ID="LanguageHiddenField" runat="server" />
    <asp:Panel ID="DirectionPanelEnglish" runat="server" Direction="LeftToRight">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="PageTitleLabel" runat="server" Text="Translate >> Web interface >> Translated Sentences" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    
        <asp:HyperLink ID="BackToTranslationHyperlink" runat="server" Text="Back to interface translation page" 
        SkinID="GreenTitleHyperLink" NavigateUrl="~/TranslateInterface.aspx"></asp:HyperLink>
        <br /><br />
        <asp:UpdatePanel ID="SentencesUpdatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Label ID="ChoosePageTitleLabel" runat="server" Text="Choose page:" SkinID="InfoLabel"></asp:Label>
                &nbsp;
                <asp:DropDownList ID="PagesDDL" runat="server" DataSourceID="PagesDataSource" DataTextField="PageName" DataValueField="PageName" 
                AutoPostBack="true" OnSelectedIndexChanged="RefreshData" ></asp:DropDownList>
                <div style="width:20px; height: 20px; padding:2px;">
                <asp:UpdateProgress ID="SentencesUpdateProgress" runat="server" AssociatedUpdatePanelID="SentencesUpdatePanel">
                    <ProgressTemplate>
                        <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                    </ProgressTemplate>
                </asp:UpdateProgress>
                </div>
                <asp:GridView ID="SentencesGridView" runat="server" AllowPaging="true" PageSize="50" AutoGenerateColumns="false"
                 SkinID="Professional" DataSourceID="TranslatedSentencesDataSource" >
                    <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                        Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
                    <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="90%">
                            <ItemTemplate>
                                <div style="overflow:auto;">
                                <asp:Label runat="server" ID="PageTitleLabel" Text="Page: " SkinID="InfoLabel" ></asp:Label>
                                <asp:Label ID="PageNameLabel" runat="server" Text='<%# Eval("PageName") %>' SkinID="GridLabel"></asp:Label>
                                <br />
                                <asp:Label ID="ResourceNameTitleLabel" runat="server" Text="Name: " SkinID="InfoLabel"></asp:Label>
                                <asp:Label ID="ResourceNameLabel" runat="server" Text='<%# Eval("ResourceName") %>' SkinID="GridLabel"></asp:Label>
                                <br />
                                <asp:Label ID="EnglishTextTitleLabel" runat="server" Text="English text: " SkinID="InfoLabel"></asp:Label>
                                <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("EnglishText") %>' SkinID="GridLabel"></asp:Label>
                                <br />
                                <asp:Label ID="TranslationTitleLabel" runat="server" Text="Translation:" SkinID="InfoLabel"></asp:Label>
                                <asp:Label ID="TranslationLabel" runat="server" Text='<%# Eval("Text") %>' SkinID="GridLabel"></asp:Label>
                                </div>
                            </ItemTemplate>
                            <EditItemTemplate>  
                                <asp:HiddenField ID="ResourceIdHiddenField" runat="server" Value='<%# Bind("ResourceId") %>'/>
                                <div style="overflow:auto;">
                                <asp:Label ID="PageTitleLabel" runat="server" Text="Page: " SkinID="InfoLabel" ></asp:Label>
                                <asp:Label ID="PageNameLabel" runat="server" Text='<%# Eval("PageName") %>' SkinID="GridLabel"></asp:Label>
                                <br />
                                <asp:Label ID="ResourceNameTitleLabel" runat="server" Text="Name: " SkinID="InfoLabel"></asp:Label>
                                <asp:Label ID="ResourceNameLabel" runat="server" Text='<%# Eval("ResourceName") %>' SkinID="GridLabel"></asp:Label>
                                <br />
                                <asp:Label ID="EnglishTextTitleLabel" runat="server" Text="English text: " SkinID="InfoLabel"></asp:Label>
                                <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("EnglishText") %>' SkinID="GridLabel"></asp:Label>
                                <br />
                                <asp:Label ID="TranslationTitleLabel" runat="server" Text="Translation:" SkinID="InfoLabel"></asp:Label>
                                <br />
                                <CustomControls:TextArea ID="TranslationTextBox" runat="server" Text='<%# Bind("Text") %>' TextMode="MultiLine" Width="100%"
                                 Height="60" MaxLength="4000"></CustomControls:TextArea>
                                </div>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:LinkButton ID="EditItemTemplate" runat="server" SkinID="GreenTitleLink" Text="Edit" CommandName="Edit"></asp:LinkButton>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:LinkButton ID="UpdateLinkButton" runat="server" SkinID="GreenTitleLink" Text="Update" CommandName="Update"></asp:LinkButton>
                                <asp:LinkButton ID="CancelLinkButton" runat="server" SkinID="GreenTitleLink" Text="Cancel" CommandName="Cancel"></asp:LinkButton>
                            </EditItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <asp:Label ID="NoTrasnationLabel" runat="server" Text="Nothing was translated yet"></asp:Label>
                    </EmptyDataTemplate>
                </asp:GridView>
            
            </ContentTemplate>
        </asp:UpdatePanel>
   
        <asp:SqlDataSource ID="PagesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetInterfacePages" SelectCommandType="StoredProcedure" >
            <SelectParameters>
                <asp:ControlParameter ControlID="LanguageHiddenField" Name="Language" Type="Decimal" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="TranslatedSentencesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetInterfaceTranslatedSentences" SelectCommandType="StoredProcedure"
        UpdateCommand="Nivdal_UpdateInterfaceResourceTranslation" UpdateCommandType="StoredProcedure" >
            <UpdateParameters>
                <asp:Parameter Name="ResourceId" Type="Decimal" />
                <asp:Parameter Name="Text" Type="String" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <br /><br />
        <asp:UpdatePanel ID="IgnoredSentencesUpdatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Label ID="IgnoredSentencesTitleLabel" runat="server" Text="Ignored sentences" SkinID="InfoLabel"></asp:Label>
                <div style="height:20px; padding:2px;">
                    <asp:UpdateProgress ID="IgnoredSentencesUpdateProgress" runat="server">
                        <ProgressTemplate>
                            <asp:Image ID="IgnoredSentencesProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                        </ProgressTemplate>
                    </asp:UpdateProgress>            
                </div>
                <asp:GridView ID="IgnoredSentencesGridView" runat="server" SkinID="Professional" AllowPaging="false" 
                 DataSourceID="IgnoredSentencesDataSource" AutoGenerateColumns="false" OnRowCommand="UnignoreResource">
                    <Columns>
                        <asp:TemplateField HeaderText="String name">
                            <ItemTemplate>
                                <asp:Label ID="StringNameLabel" runat="server" Text='<%# Eval("ResourceName") %>' SkinID="TeamIdLabel"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("Text") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="UnignoreLinkButton" runat="server" Text="Unignore" SkinID="GreenTitleLink"
                                 CommandArgument='<%# Eval("IgnoreId") %>' CommandName="Unignore"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </div>
    </asp:Panel>
    <asp:SqlDataSource ID="IgnoredSentencesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="Nivdal_GetIgnoredInterfaceSentences" SelectCommandType="StoredProcedure" >
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">
    <asp:Label ID="PageNameTitleLabel" runat="server" Text="Translate >> Web interface >> Translated Sentences" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

